DAT210x - Programming with Python for DS

Module2 - Lab4

Import and alias Pandas:


In [ ]:
# .. your code here ..

Load up the table from the link, and extract the dataset out of it. If you're having issues with this, look carefully at the sample code provided in the reading:


In [ ]:
# .. your code here ..

Next up, rename the columns so that they are similar to the column definitions provided to you on the website. Be careful and don't accidentally use any column names twice. If a column uses special characters, you can replace them with regular characters to make it easier to work with:


In [ ]:
# .. your code here ..

Get rid of any row that has at least 4 NANs in it. That is, any rows that do not contain player points statistics:


In [ ]:
# .. your code here ..

At this point, look through your dataset by printing it. There probably still are some erroneous rows in there. What indexing command(s) will you use to select all rows EXCEPT those rows?


In [ ]:
# .. your code here ..

Get rid of the 'RK' column:


In [ ]:
# .. your code here ..

Make sure there are no holes in your index by resetting it. There is an example of this in the reading material. By the way, drop the original index.


In [ ]:
# .. your code here ..

Check the data type of all columns, and ensure those that should be numeric are numeric.


In [ ]:
# .. your code here ..

Your dataframe is now ready! Use the appropriate commands to answer the questions on the course lab page.


In [ ]:
# .. your code here ..